'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
    */
    await queryInterface.bulkInsert('menus', [
      {
        "id": 1,
        "parentId": 0,
        "title": "首页",
        "path": "/layout/home",
        "name": "Home",
        "component": "Home",
        "is_frame": "1",
        "menu_type": "C",
        "visible": "0",
        "orderNum": 1,
        "status": "0",
        "perms": "",
        "icon": "nav-home",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 3,
        "parentId": 2,
        "title": "用户中心",
        "path": "user",
        "name": "User",
        "component": "User",
        "is_frame": "1",
        "menu_type": "C",
        "visible": "0",
        "orderNum": 1,
        "status": "0",
        "perms": "",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 16,
        "parentId": 3,
        "title": "查询",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 1,
        "status": "0",
        "perms": "system:user:query",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 19,
        "parentId": 4,
        "title": "查询",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 1,
        "status": "0",
        "perms": "system:role:query",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 23,
        "parentId": 5,
        "title": "查询",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 1,
        "status": "0",
        "perms": "system:menu:query",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 27,
        "parentId": 6,
        "title": "查询",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 1,
        "status": "0",
        "perms": "system:dept:query",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 31,
        "parentId": 7,
        "title": "字典类型查询",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 1,
        "status": "0",
        "perms": "system:dictType:query",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 39,
        "parentId": 8,
        "title": "查询",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 1,
        "status": "0",
        "perms": "system:notice:query",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 2,
        "parentId": 0,
        "title": "系统管理",
        "path": "/system",
        "name": "Layout",
        "component": "Layout",
        "is_frame": "1",
        "menu_type": "M",
        "visible": "0",
        "orderNum": 20,
        "status": "0",
        "perms": "",
        "icon": "system",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 4,
        "parentId": 2,
        "title": "角色管理",
        "path": "role",
        "name": "Role",
        "component": "Role",
        "is_frame": "1",
        "menu_type": "C",
        "visible": "0",
        "orderNum": 2,
        "status": "0",
        "perms": "",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 9,
        "parentId": 3,
        "title": "新增",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 2,
        "status": "0",
        "perms": "system:user:add",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 20,
        "parentId": 4,
        "title": "新增",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 2,
        "status": "0",
        "perms": "system:role:add",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 24,
        "parentId": 5,
        "title": "新增",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 2,
        "status": "0",
        "perms": "system:menu:add",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 28,
        "parentId": 6,
        "title": "新增",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 2,
        "status": "0",
        "perms": "system:dept:add",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 32,
        "parentId": 7,
        "title": "字典类型新增",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 2,
        "status": "0",
        "perms": "system:dictType:add",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 40,
        "parentId": 8,
        "title": "新增",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 2,
        "status": "0",
        "perms": "system:notice:add",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 5,
        "parentId": 2,
        "title": "菜单管理",
        "path": "menu",
        "name": "Menu",
        "component": "Menu",
        "is_frame": "1",
        "menu_type": "C",
        "visible": "0",
        "orderNum": 3,
        "status": "0",
        "perms": "",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 17,
        "parentId": 3,
        "title": "修改",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 3,
        "status": "0",
        "perms": "system:user:update",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 21,
        "parentId": 4,
        "title": "修改",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 3,
        "status": "0",
        "perms": "system:role:update",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 25,
        "parentId": 5,
        "title": "修改",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 3,
        "status": "0",
        "perms": "system:menu:update",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 29,
        "parentId": 6,
        "title": "修改",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 3,
        "status": "0",
        "perms": "system:dept:update",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 33,
        "parentId": 7,
        "title": "字典类型修改",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 3,
        "status": "0",
        "perms": "system:dictType:update",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 41,
        "parentId": 8,
        "title": "修改",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 3,
        "status": "0",
        "perms": "system:notice:update",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 6,
        "parentId": 2,
        "title": "部门管理",
        "path": "dept",
        "name": "Dept",
        "component": "Dept",
        "is_frame": "1",
        "menu_type": "C",
        "visible": "0",
        "orderNum": 4,
        "status": "0",
        "perms": "",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 18,
        "parentId": 3,
        "title": "删除",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 4,
        "status": "0",
        "perms": "system:user:delete",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 22,
        "parentId": 4,
        "title": "删除",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 4,
        "status": "0",
        "perms": "system:role:delete",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 26,
        "parentId": 5,
        "title": "删除",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 4,
        "status": "0",
        "perms": "system:menu:delete",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 30,
        "parentId": 6,
        "title": "删除",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 4,
        "status": "0",
        "perms": "system:dept:delete",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 34,
        "parentId": 7,
        "title": "字典类型删除",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 4,
        "status": "0",
        "perms": "system:dictType:delete",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 42,
        "parentId": 8,
        "title": "删除",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 4,
        "status": "0",
        "perms": "system:notice:delete",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 35,
        "parentId": 7,
        "title": "字典数据查询",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 5,
        "status": "0",
        "perms": "system:dictData:query",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 43,
        "parentId": 3,
        "title": "修改密码",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 5,
        "status": "0",
        "perms": "system:user:updatePwd",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 46,
        "parentId": 4,
        "title": "修改状态",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 5,
        "status": "0",
        "perms": "system:role:updateStatus",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 7,
        "parentId": 2,
        "title": "字典管理",
        "path": "dict",
        "name": "Dict",
        "component": "Dict",
        "is_frame": "1",
        "menu_type": "C",
        "visible": "0",
        "orderNum": 6,
        "status": "0",
        "perms": "",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 36,
        "parentId": 7,
        "title": "字典数据新增",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 6,
        "status": "0",
        "perms": "system:dictData:add",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 44,
        "parentId": 3,
        "title": "修改用户状态",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 6,
        "status": "0",
        "perms": "system:user:updateStatus",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 8,
        "parentId": 2,
        "title": "通告管理",
        "path": "notice",
        "name": "Notice",
        "component": "Notice",
        "is_frame": "1",
        "menu_type": "C",
        "visible": "0",
        "orderNum": 7,
        "status": "0",
        "perms": "",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 37,
        "parentId": 7,
        "title": "字典数据修改",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 7,
        "status": "0",
        "perms": "system:dictData:update",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 45,
        "parentId": 3,
        "title": "上传图片",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 7,
        "status": "0",
        "perms": "system:user:uploadImg",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },
      {
        "id": 38,
        "parentId": 7,
        "title": "字典数据删除",
        "path": null,
        "name": null,
        "component": null,
        "is_frame": "1",
        "menu_type": "F",
        "visible": "0",
        "orderNum": 8,
        "status": "0",
        "perms": "system:dictData:delete",
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": "admin"
      },

      {
        "id": 47,
        "parentId": 0,
        "title": "音乐管理",
        "path": "/music",
        "name": "Layout",
        "component": "Layout",
        "is_frame": "1",
        "menu_type": "M",
        "visible": "0",
        "orderNum": 2,
        "status": "0",
        "perms": null,
        "icon": "music",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": 'admin'
      },
      {
        "id":48,
        "parentId":47,
        "title":"歌曲管理",
        "path":"song",
        "name":"Song",
        "component":"Song",
        "is_frame":"1",
        "menu_type":"C",
        "visible":"0",
        "orderNum":1,
        "status":"0",
        "perms":null,
        "icon":null,
        "isDelete":"0",
        "remark":null,
        "createdAt": new Date(),
        "createdBy": 'admin'
      },
      {
        "id": 49,
        "parentId": 47,
        "title": "歌单管理",
        "path": "songSheet",
        "name": "SongSheet",
        "component": "SongSheet",
        "is_frame": "1",
        "menu_type": "C",
        "visible": "0",
        "orderNum": 2,
        "status": "0",
        "perms": null,
        "icon": "#",
        "isDelete": "0",
        "remark": null,
        "createdAt": new Date(),
        "createdBy": 'admin'
      },
      {
        "id":50,
        "parentId":47,
        "title":"歌单详情",
        "path":"songSheetDetail/:id(\\d+)",
        "name":"SongSheetDetail",
        "component":"SongSheetDetail",
        "is_frame":"1",
        "menu_type":"C",
        "visible":"1",
        "orderNum":3,
        "status":"0",
        "perms":null,
        "icon":null,
        "isDelete":"0",
        "remark":null,
        "createdAt": new Date(),
        "createdBy": 'admin'
    },
    ], {});
  },

  down: async (queryInterface, Sequelize) => {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
    await queryInterface.bulkDelete('menus', null, {});
  }
};
